{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2024-08-30T09:14:07.435506300Z",
     "start_time": "2024-08-30T09:14:07.375429300Z"
    }
   },
   "outputs": [],
   "source": [
    "import requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ok\n"
     ]
    }
   ],
   "source": [
    "def down_m3u8():\n",
    "    m3u8_url = \"https://hls.vdtuzv.com/videos4/852493606d3ae09f903f5a67440b57bf/852493606d3ae09f903f5a67440b57bf.m3u8?auth_key=1725008978-66d18c5293f14-0-b7d4a1a1fe53bccb4144afa16ee6adef&v=3&time=0\"\n",
    "    resp = requests.get(m3u8_url)\n",
    "    m3u8_txt = resp.text\n",
    "    with open('userTv/wudao.m3u8','w') as f:\n",
    "        f.write(m3u8_txt)\n",
    "    print(\"ok\")\n",
    "\n",
    "down_m3u8()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-08-30T09:20:43.129893800Z",
     "start_time": "2024-08-30T09:20:40.758650700Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
